package com.indexingsystem.system.service;

import java.util.List;

import com.indexingsystem.boss.Vo.ResCategoryRelationsVo;
import com.indexingsystem.boss.Vo.SelectResDetailVO;
import com.indexingsystem.boss.entity.ResCategoryRelations;

public interface IResCategoryRelationsService {

	/**
	 * 根据资源分类与资源关系id解除关系.
	 * 
	 * @param resCategoryRelationId
	 * @return
	 */
	int deleteByPrimaryKey(String resCategoryRelationId) throws Exception;
	
	/**
	 * 根据资源分类与资源id解除关系.
	 * 
	 * @param resCategoryRelationId
	 * @return
	 */
	int deleteByPrimaryKeyByResId(String resId) throws Exception;
	   /**
     * 获取所有资源分类中有资源的资源分类id集合.
     * @return
     */
    List<String> getResourceCategoryIdList();

	/**
	 * 通过资源分类id解除所有资源分类中资源关系.
	 * 
	 * @param resCategoryId
	 * @return
	 */
	int deleteResRelationByResCategoryId(String resCategoryId) throws Exception;

	/**
	 * 建立资源分类与资源的关系.
	 * 
	 * @param record
	 * @return
	 */
	int insertSelective(ResCategoryRelations record) throws Exception;
	
	/**
	 * 通过资源分类id和资源id删除资源分类关系信息.
	 * @param resCategoryRelations
	 * @return
	 */
	int deleteResRelationByResIdOrResCategoryId(ResCategoryRelations resCategoryRelations) throws Exception;
	
	/**
	 * 批量新增资源分类中的资源关系.
	 * 
	 * @param resCategoryRelationsList
	 * @return
	 */
	int insertResCategoryRelationsBatch(String request) throws Exception;

	/**
	 * 批量修改资源分类中的资源关系.
	 * 
	 * @param resCategoryRelationsList
	 * @return
	 */
	int updateResCategoryRelationsBatch(String request) throws Exception;
	
	/**
	 * 批量删除资源分类已存在的数据.
	 * 
	 * @param resCategoryRelationsList
	 * @return
	 */
	int batchDeleteResCategoryRelations(ResCategoryRelations resCategoryRelationsList) throws Exception;

	/**
	 * 通过资源分类与资源关系id，查询资源详情.
	 * 
	 * @param resCategoryRelationId
	 * @return
	 */
	ResCategoryRelations selectByPrimaryKey(String resCategoryRelationId);

	/**
	 * 通过资源id查询资源关系信息.
	 * 
	 * @param resId
	 * @return
	 */
	List<ResCategoryRelationsVo> getResCategoryRelationsByResId(String resId);
	
	
	
	/**
	 * 修改资源分类与资源关系.
	 * 
	 * @param record
	 * @return
	 */
	int updateByPrimaryKeySelective(ResCategoryRelations record) throws Exception;
	
	
	/**
	 * 通过分类id和资源id结合查询返回资源分类关系.
	 * @param record
	 * @return
	 */
	List<ResCategoryRelations> selectResCategoryRelationsInfo(ResCategoryRelations record);
	ResCategoryRelations selectResCategoryRelationsModelInfo(ResCategoryRelations record);
	/**
	 * 通过资源id查询资源分类与资源关联信息.
	 * 
	 * @param resId
	 * @return
	 */
	List<ResCategoryRelations> selectResCategoryRelByResId(ResCategoryRelations resCategoryRelations);
	
	   /**
     * 通过资源分类id获取分类关联资源.
     * @param resCategoryId
     * @return
     */
    List<ResCategoryRelations> selectResCategoryRelByResCategoryId(String resCategoryId);
    
    
    
    /**
     * 通过资源关系ID查询资源更新列表
     * @param resId
     * @return
     */
    SelectResDetailVO selectResDetail(String res_category_relation_id);
}